/*
PEDL_5B.do

Contains: Runs analyses for Table 3

*/

* Set filepath (YOUR FILEPATH HERE)
global pedl ""

*******************************************************************************
*******************************************************************************

import delimited "$pedl\endline.csv", clear

* Regression -- Time spent collecting wood
replace wood_time_collect = "." if wood_time_collect == "NA"
destring wood_time_collect, replace

poisson wood_time_collect i.armfactor, vce(robust) 

contrast r.arm



* Regression -- Time spent collecting wood
replace trad_freq = "." if trad_freq == "NA"
destring trad_freq, replace

replace trad_freq = 0 if inlist(trad_freq, 2, 3)

poisson trad_freq i.armfactor, vce(robust) irr

contrast r.arm